<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="./js/vue.js"></script>
    <script src="./js/element-ui.js"></script>
    <link rel="stylesheet" href="./js/element-ui.css">
    <script src="./js/axios.js"></script>

</head>

<body>
    <div id="app">
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="no" label="序号" width="180">
            </el-table-column>
            <el-table-column prop="name" label="栏目名称" width="180">
            </el-table-column>
            <el-table-column prop="description" label="描述">
            </el-table-column>
        </el-table>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                tableData: []
            },
            methods: {
               async findAllcategory(){
                    axios.defaults.baseURL='http://39.103.160.49:8888';
                    var result = await axios({
                        url:'/index/category/findAll',
                        methods:'get',

                    })
                    console.log(result.data.data);
                    this.tableData=result.data.data;
                    
                }
            },
            created(){
                this.findAllcategory();
            }
        })
    </script>
</body>

</html>